<?php

/**
 * Description of UC_AccountLogAction
 *
 * @author Alen
 */
class UC_AccountLogAction extends PyramidUCAction {
    //put your code here
    public function index(){                
        // 获取分页数据
        $this->dm=new SoDataModule();
        $this->uig=new  SoUIGenerator();
        
        $w=request_string('keyword');
        $biz=new SoBizTransactionLog();
        $pager_text='';
        $dataset=null;
        $biz->get_paging_data($pager_text, $dataset, request_numeric('page'), $w?$w:'|'.$this->USER_NAME);
        $this->assign('pager',$pager_text);
        
        // 构建数据表格
        //$this->uig->begin_table();
        //$this->uig->add_thead('#','标题','浏览量','日期','状态','管理');
        if($dataset){
            if(!$this->biz) $this->biz=new SoBizCommon ();
            foreach($dataset as $row){
                $this->uig->add_trow($row['SerialNo'],$this->biz->get_type_name($row['TransactionType'],'TRANSACTION'),$row['Amount'],$row['Blance'],$row['FrozenBlance'],$this->biz->get_state_name($row['State'],'RECHARGE'),$row['UserRemark'],$row['CreatedTime'],$row['ModifiedTime'],$row['AdminRemark']);
            }
        }
        //$this->uig->end_table();
        $this->assign('table',$this->uig->get_text());
        $bizacc=new SoBizFinanceAccount();
        $acc=$bizacc->read_one($this->USER_NAME);
        $this->assign('blance', $acc['Blance']);
        $this->display();
    }
}

?>
